//导入request.js工具
import request from "@/utils/request";
//调用注册接口的函数
//安全生产责任制接口
export const getResponsibilitySystem = (page, size, name) => {
  return request.get("/responsibilitysystem", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteResponsibilitySystem = (list) => {
  return request.delete("/responsibilitysystem", { data: list });
};

export const addResponsibilitySystem = (obj) => {
  return request.post("/responsibilitysystem", obj);
};
//安全生产规章制度接口
export const getSafetyRegulations = (page, size, name) => {
  return request.get("/safetyregulations", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteSafetyRegulations = (list) => {
  return request.delete("/safetyregulations", { data: list });
};

export const addSafetyRegulations = (obj) => {
  return request.post("/safetyregulations", obj);
};

//安全操作规程
export const getSafetyOperatingProcedures = (page, size, name) => {
  return request.get("/safetyoperatingprocedures", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteSafetyOperatingProcedures = (list) => {
  return request.delete("/safetyoperatingprocedures", { data: list });
};

export const addSafetyOperatingProcedures = (obj) => {
  console.log(obj);
  return request.post("/safetyoperatingprocedures", obj);
};
//安全管理制度体系清单
export const getInstitutionalSystem = (page, size, name) => {
  return request.get("/institutionalsystem", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteInstitutionalSystem = (list) => {
  return request.delete("/institutionalsystem", { data: list });
};

export const addInstitutionalSystem = (obj) => {
  console.log(obj);
  return request.post("/institutionalsystem", obj);
};
//RiskIdentification
export const getRiskIdentification = (page, size, name) => {
  return request.get("/riskidentification", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteRiskIdentification = (list) => {
  return request.delete("/riskidentification", { data: list });
};

export const addRiskIdentification = (obj) => {
  console.log(obj);
  return request.post("/riskidentification", obj);
};
//JobProcedures
export const getJobProcedures = (page, size, name) => {
  return request.get("/jobprocedures", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteJobProcedures = (list) => {
  return request.delete("/jobprocedures", { data: list });
};

export const addJobProcedures = (obj) => {
  console.log(obj);
  return request.post("/jobprocedures", obj);
};
//DailySecurityChecks
export const getDailySecurityChecks = (page, size, name) => {
  return request.get("/dailysecuritychecks", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteDailySecurityChecks = (list) => {
  return request.delete("/dailysecuritychecks", { data: list });
};

export const addDailySecurityChecks = (obj) => {
  console.log(obj);
  return request.post("/dailysecuritychecks", obj);
};
//emergencysupportsystem
export const getEmergencySupportSystem = (page, size, name) => {
  return request.get("/emergencysupportsystem", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteEmergencySupportSystem = (list) => {
  return request.delete("/emergencysupportsystem", { data: list });
};

export const addEmergencySupportSystem = (obj) => {
  console.log(obj);
  return request.post("/emergencysupportsystem", obj);
};
//OutsourcedProjectManagement
export const getOutsourcedProjectManagement = (page, size, name) => {
  return request.get("/outsourcedprojectmanagement", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteOutsourcedProjectManagement = (list) => {
  return request.delete("/outsourcedprojectmanagement", { data: list });
};

export const addOutsourcedProjectManagement = (obj) => {
  console.log(obj);
  return request.post("/outsourcedprojectmanagement", obj);
};
//corporateproductionresponsibility
export const getCorporateProductionResponsibility = (page, size, name) => {
  return request.get("/corporateproductionresponsibility", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteCorporateProductionResponsibility = (list) => {
  return request.delete("/corporateproductionresponsibility", { data: list });
};
export const addCorporateProductionResponsibility = (obj) => {
  return request.post("/corporateproductionresponsibility", { ...obj });
};
export const putCorporateProductionResponsibility = (form) => {
  return request.put("/corporateproductionresponsibility", form);
};
//productionpostresponsibilities
export const getProductionPostResponsibilities = (page, size, name) => {
  return request.get("/productionpostresponsibilities", {
    params: {
      page: page,
      size: size,
      fileName: name,
    },
  });
};
export const deleteProductionPostResponsibilities = (list) => {
  return request.delete("/productionpostresponsibilities", { data: list });
};
export const addProductionPostResponsibilities = (obj) => {
  return request.post("/productionpostresponsibilities", { ...obj });
};
export const putProductionPostResponsibilities = (form) => {
  console.log(form);
  return request.put("/productionpostresponsibilities", form);
};
